<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        section {
            display: flex;
            width: 1000px;
            height: 500px;
            background-color: chartreuse;
        }
        div {
            width: 100px;
            height: 100px;
            background-color: cornflowerblue;
        }
        /* 第二个div自己独占一份 */
        div:nth-child(2) {
            flex: 1;
            background-color: crimson;
        }

        p {
            display: flex;
            width: 1000px;
            height: 500px;
            background-color: darkkhaki;
        }
        span {
            flex: 3;
            height: 100px;
            background-color: darkorange;
           
        }
        
    </style>
</head>
<body>
    <section>
        <div>1</div>
        <div>2</div>
        <div>3</div>
    </section>
    <p>
        <span>1</span>
        <span>2</span>
        <span>3</span>
    </p>
</body>
</html>